package com.ruoyi.yyq.api.factory;

import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.yyq.api.RemoteCarServiceDetailsService;
import com.ruoyi.yyq.api.domain.CarServiceDetails;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteCarServiceDetailsFallbackFactory implements FallbackFactory<RemoteCarServiceDetailsService> {
	private static final Logger log = LoggerFactory.getLogger(RemoteCarServiceDetailsFallbackFactory.class);
	@Override
	public RemoteCarServiceDetailsService create(Throwable cause) {
		log.error("服务调用失败:{}", cause.getMessage());
		return new RemoteCarServiceDetailsService(){


			@Override
			public TableDataInfo getlist(String source, CarServiceDetails carServiceDetails) {
				return null;
			}
		};
	}
}
